<%--
  User: Shengzhao Li
--%>
<%@ attribute name="currentSprint" required="true"
              type="com.andaily.domain.dto.developer.SprintDto" %>
<%@ attribute name="task" required="true"
              type="com.andaily.domain.dto.developer.SprintTaskDto" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@tag pageEncoding="UTF-8" %>

<c:if test="${not currentSprint.finished}">
    <c:set var="sprintPending" value="${currentSprint.status eq 'PENDING'}"/>
    <li ${sprintPending?'':'class="disabled"'}>
        <c:if test="${sprintPending}">
            <a tabindex="-1" href="${contextPath}/developer/task_action/start/${task.guid}"><i
                    class="icon-play"></i> Do it</a>
        </c:if>
        <c:if test="${not sprintPending}">
            <a tabindex="-1" href="javascript:void(0);"
               title="Enable the action when the sprint is pending"><i class="icon-play icon-white"></i> Do
                it</a>
        </c:if>
    </li>
    <li class="divider"></li>
    <li><a tabindex="-1"
           href="${contextPath}/developer/task_form/${task.guid}?sprintGuid=${currentSprint.guid}"><i
            class="icon-edit"></i> Edit</a>
    </li>
    <li><a tabindex="-1" href="${contextPath}/developer/task_action/archive/${task.guid}" class="confirm"
           confirm-content="Are you sure archive the task?"><i class="icon-remove"></i> Archive</a></li>
</c:if>